package com.chenfei.sharding.jdbc.service.impl;

import com.chenfei.sharding.jdbc.entity.Score;
import com.chenfei.sharding.jdbc.mapper.ScoreMapper;
import com.chenfei.sharding.jdbc.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author chenfei
 * @description
 * @since 2018/3/30
 */
@Service
public class ScoreServiceImpl implements ScoreService{

    @Autowired
    ScoreMapper scoreMapper;

    @Override
    public int insert(Score score) {
        return scoreMapper.insertSelective(score);
    }

    @Override
    public Score find(Integer id) {
        return scoreMapper.selectById(id);
    }
}
